﻿using GolSig.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Test.GolSig.Library.PositionSpecs
{



    [TestClass()]
    public class WhenCreatingPositionSize
    {





        [TestMethod(), ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void giveInvalidRow_shouldRaiseException()
        {
            int row = -1;
            int column = 0;
            Position target = new Position(row, column);
            Assert.Fail("Expected exception");
        }


        [TestMethod(), ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void giveInvalidColumn_shouldRaiseException()
        {
            int row = 0;
            int column = -1;
            Position target = new Position(row, column);
            Assert.Fail("Expected exception");
        }


        [TestMethod()]
        public void giveValidInput_RowAndColumShouldBeCorrect()
        {
            int row = 1;
            int column = 1;
            Position target = new Position(row, column);
            Assert.IsTrue(target.Row == row);
            Assert.IsTrue(target.Column == column);

        }
    }
}
